﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Security.Principal;
using System.Web.Security;
using Vmago.Models;
using Vmago.Models.DBML;

namespace Vmago.Controllers
{
    [HandleError]
    public class FurtherInformationController : ControllerBase
    {
        #region Gobal：私有变量

        private ViewDataContext m_oView = new ViewDataContext();

        #endregion

        #region MoreCity：页面初始化

        public ActionResult MoreCity(String id)
        {
            Int32 id_ = 0;
            Int32.TryParse(id, out id_);
            Int32 intPageSize = 8;
            Int32 intPageCount = 0;
            Int32 intCount = 0;

            intCount = m_oView.prc_shopRecCity(null, 10000, 1).Count();
            if (intCount % intPageSize == 0) { intPageCount = intCount / intPageSize; }
            else { intPageCount = intCount / intPageSize + 1; }

            ViewData["PageCount"] = intPageCount;
            ViewData["RecCity"] = m_oView.prc_shopRecCity(null, intPageSize, id_).ToList();

            return View();
        }

        #endregion
    }
}
